//
//  VisitorLoginView.swift
//  微博项目
//
//  Created by 英 on 15/12/13.
//  Copyright © 2015年 英. All rights reserved.
//

import UIKit

class VisitorLoginView: UIView {

    override  init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")

    }
    
    // 设置所有的子视图
    private  func setupUI() {
        addSubview(largeIcon)
    
    
        for subview in subviews {
        
            subview.translatesAutoresizingMaskIntoConstraints = false
        }
        addConstraint(NSLayoutConstraint(item: largeIcon, attribute: .CenterX, relatedBy: .Equal, toItem: self, attribute: .CenterX, multiplier: 1, constant: 0))
        addConstraint(NSLayoutConstraint(item: largeIcon, attribute: .CenterY, relatedBy: .Equal, toItem: self, attribute: .CenterY, multiplier: 1, constant: -60))
        
       

    }
    // 懒加载所有子视图
    private lazy var largeIcon: UIImageView = UIImageView(image: UIImage(named: "visitordiscover_feed_image_house"))
    
    
}
